package com.wuzf.springcloud.service;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.wuzf.common.entity.CommonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;


@Service
@FeignClient(value = "PROVIDER-PAYMENT")
public interface HystrixService {


    @PostMapping("/payment/ok")
    CommonResult ok();


    @PostMapping("/payment/error/{id}")
    CommonResult error(@PathVariable("id") Integer id);


    @PostMapping("/payment/timeout")
    CommonResult timeout();

}
